#ifndef _DNS_PARSER_H
#define _DNS_PARSER_H


#include "dns.h"

class CDnsParser
{
public:
	CDnsParser();
	virtual ~CDnsParser();
	void dnsinit();
	void dnsuninit();
	void dnsaddnamsserver(const char* addr);
	dns_req_t* dnsreq(const char* url, const char* name, void* cb);
	void dnsreqfree(void* req);
	void dnswait();

	virtual void dns_func(void *pData, const char* name, const char* url, const char* ip, void* cb)			= 0;
	virtual void dns_endfunc(void *pData, const char* name, const char* url, const char* ip, void* cb)		= 0;
	virtual void dns_errorfunc(void *pData, const char* name, const char* url, const char* ip, void* cb)	= 0;
	virtual void dns_signal(int istart)																		= 0;
private:
	dns_s	dns;
	int		irun;

};

#endif